package polymorphism;

public class Animal {
    protected String name;
    protected int age;

    public Animal(){}
    public Animal(String name,int age){
        this.name=name;
        this.age=age;
    }
    public void eat(String food){
        System.out.println(name+"正在吃"+food);
    }
}
